﻿using System;
using System.Collections.Generic;
using System.Text;
using MSDNWebcast.Models;
using System.Drawing;

namespace MSDNWebcast.ViewModels
{
    /// <summary>
    /// 下载项视图
    /// </summary>
    public class DownloadItemViewModel : ViewModelBase
    {
        private readonly DownloadItem m_DownloadItem;

        public DownloadItemViewModel(DownloadItem downloadItem)
        {
            m_DownloadItem = downloadItem;
        }

        /// <summary>
        /// 下载项名称
        /// </summary>
        public string Name
        {
            get
            { 
                return m_DownloadItem.Name; 
            }
        }

        /// <summary>
        /// 进度
        /// </summary>
        public int Process
        {
            get;
            set;
        }

        /// <summary>
        /// 已下载文件大小
        /// </summary>
        public string DownloadedFileSize
        {
            get;
            set;
        }

        /// <summary>
        /// 总文件大小
        /// </summary>
        public string FileSize
        {
            get;
            set;
        }

        /// <summary>
        /// 下载状态
        /// </summary>
        public DownloadState State 
        {
            get
            {
                return m_DownloadItem.State;
            }
        }

        /// <summary>
        /// 下载图标
        /// </summary>
        public Image FileImage
        {
            get { return null; }
        }
    }
}
